<html>

<HEAd>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"><!--规定 HTML 文档的字符集-->

<Title>生日快乐~</Title>
</HEAd>
<body>
    
    <div class='card'>
        <div class="imgBox">
            <img src="./img/背景.png">
        </div>
        <div class='details'>
            <h2>姐姐生日快乐</h2>
            <p>嗨皮啵斯嘚，祝姐姐年年岁岁不挂科，朝朝暮暮常开心。♡ʜᴀᴘᴘʏ̆̈</p>
        </div>
    </div>


    <style>
        body{
  margin: 0; /* 外边距 */
  padding: 0; /* 内边距 */
  background: url(./img/演示文稿1.jpg); /* 背景颜色 */
}
img{
  width: 100%; /* 宽 */
}
.card{
  position: absolute; /* 绝对定位 */
  top: 50%; /* 距上部 */
  left: 50%; /* 距左部 */
  width: 300px;
  height: 400px;
  background: #fff;
  transform-style: preserve-3d; /* 开启3D空间 */
  transform: translate(-50%,-50%) perspective(2000px); /* 移动X,Y */
  box-shadow: inset 300px 0 50px rgba(0, 0, 0, 0.5), 0 20px 100px rgba(0, 0, 0, 0.5); /*阴影*/
  transition: 1s;
}
.card:hover{
  transform: translate(-50%,-50%) perspective(2000px) rotate(-10deg);
  box-shadow: inset 20px 0 50px rgba(0, 0, 0, 0.5), 0 10px 100px rgba(0, 0, 0, 0.5);
}
.card::before{ /*上边框*/ 
  content: '';
  position: absolute;
  top:-5px;
  left: 0;
  width: 100%;
  height: 5px;
  z-index: 10;
  background: #f159f7;
  transform: skewX(-45deg); /*X轴扭曲*/
}
.card::after{ /*右边框*/
  content: '';
  position: absolute;
  top: 0;
  right: -5px;
  width: 5px;
  height: 100%;
  background-color: #ff36e4 ;
}
.card .imgBox{ /*图片*/
  user-select: none; /*不可选取*/
  width: 100%;
  height: 100%;
  position: relative;
  transform-origin: left; /*更改元素变形位置*/
  transition: 1s cubic-bezier(.15,1.7,.84,.58);

}
.card:hover .imgBox{
  transform: rotateY(-155deg); /*Y轴转动*/
}
.card .details{ /*文本效果*/
  position: absolute;
  top:0;
  left: 0;
  box-sizing: border-box;
  padding: 20px;
  z-index: -1;
  font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
}

    </style>
</body>
</html>
